<?php
/**
 * This is route configuration file.
 *
 * In this file, you set up routes to your controllers and their actions.
 * Routes are very important mechanism that allows you to freely connect
 * different urls to chosen controllers and their actions (functions).
 *
 * @copyright     Copyright 2008-2010, LilCake.net
 * @link          http://lilcake.net LilCake.net
 * @package       lil_blogs
 * @subpackage    lil_blogs.app.config
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */

/**
 * Here, we are connecting '/' (base path) to plugin blogs controller.
*/
	Router::connect(
		'/',
		array(
			'plugin'     => 'lil_blogs',
			'controller' => 'posts', 
			'action'     => 'index', 
			'blogname'   => Configure::read('defaultBlog')
		)
	);
	
 	// login logout
	Router::connect('/login', array(
		'admin'      => null,
		'plugin'     => 'lil',
		'controller' => 'users',
		'action'     => 'login',
	));
	
	Router::connect('/logout', array(
		'admin'      => null,
		'plugin'     => 'lil',
		'controller' => 'users',
		'action'     => 'logout',
	));
/**
 * Connect static pages.
 */
	Router::connect(
		'/pages/*',
		array(
			'plugin'     => false,
			'controller' => 'pages',
			'action'     => 'display'
		)
	);
/**
 * Connect Lil routes
 */
 	require APP . 'plugins' . DS . 'lil' . DS . 'config' . DS . 'routes.php';
 	
 	
?>